<titlemenu></titlemenu>
<div class="dj-card">
    <div class="dj-body" activate-input activate-select>
        <form ng-if="st==1" role="form" name="editForm" novalidate>
            <div class="dj-formtable">
                <table class="dj-table">
                    <tr>
                        <th>党组织名称</th>
                        <td ng-class="{ 'has-error' : this.editForm.partyname.$invalid &&  this.editForm.$submitted}">
                            <div class="input-group input-group-search"
                                 title="选择党组织" ng-click="selectParty()">
                                <input type="text" name="partyname" ng-model="dataModel.partyname"
                                       ng-required="true" ng-disabled="true"
                                       class="form-control"/>
                                <span class="input-group-addon"><i class="material-icons">search</i></span>
                            </div>
                            <span ng-show="this.editForm.partyname.$invalid &&  this.editForm.$submitted"
                                  class="error">必填.</span>
                        </td>
                        <th>党员人数</th>
                        <td ng-class="{ 'has-error' : this.editForm.pcount.$invalid &&  this.editForm.$submitted}">
                            <input type="number" name="pcount" ng-model="dataModel.pcount"
                                   class="form-control" ng-required="true"/>
                            <span ng-show="this.editForm.pcount.$invalid &&  this.editForm.$submitted"
                                  class="error">必填.</span>
                        </td>
                    </tr>
                    <tr>
                        <th>地址</th>
                        <td ng-class="{ 'has-error' : this.editForm.addr.$invalid &&  this.editForm.$submitted}">
                            <input type="text" name="addr" ng-model="dataModel.addr"
                                   maxlength="800"
                                   class="form-control" ng-required="true"/>
                            <span ng-show="this.editForm.addr.$invalid &&  this.editForm.$submitted"
                                  class="error">必填.</span>
                        </td>
                        <th>使用范围</th>
                        <td ng-class="{ 'has-error' : this.editForm.userange.$invalid &&  this.editForm.$submitted}">
                            <select name="userange" ng-model="dataModel.userange" class="form-control"
                                    ng-options="type.dickey as type.dicvalue for type in useRangeList"
                                    ng-required="true">
                                <option value="">--全部--</option>
                            </select>
                            <span ng-show="this.editForm.userange.$invalid &&  this.editForm.$submitted"
                                  class="error">必填.</span>
                        </td>
                    </tr>
                    <tr ng-if="dataModel.userange==1">
                        <th>使用党支部</th>
                        <td colspan="3"
                            ng-class="{ 'focused error' : this.editForm.partys.$invalid &&  this.editForm.$submitted}">
                            <div class="input-group input-group-search"
                                 data-dataoptions="selectPartylist"
                                 title="党支部" bsselectdata-pro>
                                <input name="partys" type="text" ng-model="selectPartylist.selectedLabeData"
                                       class="form-control" ng-required="true"
                                       ng-disabled="true"/>
                                <span class="input-group-addon"><i class="material-icons">search</i></span>
                            </div>
                            <span ng-show="this.editForm.partys.$invalid &&  this.editForm.$submitted"
                                  class="error">必填.</span>
                        </td>
                    </tr>
                    <tr>
                        <th>面积（平方）</th>
                        <td ng-class="{ 'has-error' : this.editForm.usearea.$invalid &&  this.editForm.$submitted}">
                            <input type="number" name="usearea" ng-model="dataModel.usearea"
                                   class="form-control" ng-required="true"/>
                            <span ng-show="this.editForm.usearea.$invalid &&  this.editForm.$submitted"
                                  class="error">必填.</span>
                        </td>
                        <td colspan="2"></td>
                    </tr>

                    <tr>
                        <th>图片</th>
                        <td colspan="3">
                            <bsfiles ng-model="img_ReqFileModel"/>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="form_foot">
                <button type="button" class="btn btn-default" ng-click="pagechange();">取消</button>
                <button role-permission-code="djPartyActivityRoomEdit.btnSave" type="submit"
                        class="btn btn-primary" ng-if="isDetail"
                        ng-click="submitData(this.editForm.$valid)">提交
                </button>
            </div>
        </form>
        <div ng-if="st!=1">
            <div class="dj-formtable">
                <table class="dj-table">
                    <tr>
                        <th>党组织名称</th>
                        <td ng-bind="dataModel.partyname">
                        </td>
                        <th>党员人数</th>
                        <td ng-bind="dataModel.pcount" >
                        </td>
                    </tr>
                    <tr>
                        <th>地址</th>
                        <td ng-bind="dataModel.addr">
                        </td>
                        <th>使用范围</th>
                        <td ng-bind="dataModel.userange|dicShowValFilter:useRangeList">

                        </td>
                    </tr>
                    <tr ng-if="dataModel.userange==1">
                        <th>使用党支部</th>
                        <td colspan="3"
                            ng-bind="selectPartylist.selectedLabeData">

                        </td>
                    </tr>
                    <tr>
                        <th>面积（平方）</th>
                        <td ng-bind="dataModel.usearea">

                        </td>
                        <td colspan="2"></td>
                    </tr>

                    <tr>
                        <th>图片</th>
                        <td colspan="3">
                            <bsfiles ng-model="img_ReqFileModel"/>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="form_foot">
                <button type="button" class="btn btn-default" ng-click="pagechange();">取消</button>
            </div>
        </div>
    </div>
</div>
